home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / hulk.swf / scripts / Enemy.as < prev    next >
Encoding:
Text File  |  2010-04-12  |  700 b   |  30 lines

  1. package
  2. {
  3.    import com.markdavies.events.CustomEvent;
  4.    import marvel.centralsmashdown.game.sprites.Enemy;
  5.    import marvel.centralsmashdown.game.sprites.GameSprite;
  6.    
  7.    [Embed(source="/_assets/assets.swf", symbol="Enemy")]
  8.    public dynamic class Enemy extends marvel.centralsmashdown.game.sprites.Enemy
  9.    {
  10.        
  11.       
  12.       public function Enemy()
  13.       {
  14.          super();
  15.          addFrameScript(0,frame1,44,frame45);
  16.       }
  17.       
  18.       internal function frame1() : *
  19.       {
  20.          stop();
  21.       }
  22.       
  23.       internal function frame45() : *
  24.       {
  25.          dispatchEvent(new CustomEvent(GameSprite.EVENT_ENEMY_DIE));
  26.          stop();
  27.       }
  28.    }
  29. }
  30.